package com.googlecode.garbagecan.test.socket.sample5;

public class BigObject implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;

	private String name;
	
	private byte[] bytes;
	
	public BigObject(String name, int size) {
		this.name = name;
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < size; i++) {
			sb.append("-");
		}
		this.bytes = sb.toString().getBytes();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public byte[] getBytes() {
		return bytes;
	}

	public void setBytes(byte[] bytes) {
		this.bytes = bytes;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("name: ").append(name).append("\n");
		sb.append("bytes length: ").append(bytes.length).append("\n");
		return sb.toString();
	}
}
